*Paper: Fiscal Rules, Corruption and Electoral Accountability - Replication Files

clear all
cap log close 
set more off


**Global files
global folder "/Users/tommasogiommoni/Dropbox/Determinants of corruption/Stability pact and corruption/Replication files JOP"


********************************************************************************
****----						Dataset open 					    	----**** 
********************************************************************************

use "$folder/Data/FigureA7.dta", clear

**-- Global

global controls7 proportion_female_Elected_lag av_education_Elected_lag av_age_Elected_lag  victory_margin_lag term_limit_lag 
global controls7_int  c.proportion_female_Elected_lag##i.anno c.av_education_Elected_lag##i.anno c.av_age_Elected_lag##i.anno c.victory_margin_lag##i.anno  c.term_limit_lag##i.anno

**-- Panel dataset

xtset codcom anno
fvset base 2012 anno

********************************************************************************
****----						Analysis 					    		----**** 
********************************************************************************

****---- Regressions

foreach var in canteen_school_admitted  meals_offered_school kids_admitted workers_kindergarten kids_kindergarten share_light trash_share mun_workers_PC mun_workers_PC{
qui reghdfe `var'_sd S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==1 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom region_year) vce(cluster codcom)
est store r_`var'
}

qui reghdfe income_ACI_amount_PC_st S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==1 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab4_21
qui reghdfe log_diff_6_1_AvRevenues S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==1 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab4_3
qui reghdfe log_diff_6_12_AvRevenues S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==1 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab4_4

****---- Figure

coefplot ///
(tab4_21, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue) lwidth(*0.75 *1.25)) mlabels(1.S#1.T = 12 "Municipal GDP (PC)") mlabcolor(midblue)) ///
(tab4_3, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue) lwidth(*0.75 *1.25)) mlabels(1.S#1.T = 12 "Income inequality 1") mlabcolor(midblue)) ///
(tab4_4, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue) lwidth(*0.75 *1.25)) mlabels(1.S#1.T = 12 "Income inequality 2") mlabcolor(midblue)) ///
(r_kids_kindergarten, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue) lwidth(*0.75 *1.25)) mlabels(1.S#1.T = 12 "N children kindergartens") mlabcolor(midblue)) ///
(r_kids_admitted, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue)) mlabels(1.S#1.T = 12 "kindergartens spots/requests") mlabcolor(midblue)) ///
(r_meals_offered_school, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue) lwidth(*0.75 *1.25)) mlabels(1.S#1.T = 12 "School canteens meals") mlabcolor(midblue)) ///
(r_canteen_school_admitted, base mcolor(midblue) ciopts(recast(rcap) color(midblue midblue)) mlabels(1.S#1.T = 12 "N canteens spots/requests") mlabcolor(midblue)) ///
(r_workers_kindergarten, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue)) mlabels(1.S#1.T = 12 "N employees schools") mlabcolor(midblue)) ///
(r_share_light, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue) lwidth(*0.75 *1.25)) mlabels(1.S#1.T = 12 "Street lighting share") mlabcolor(midblue)) ///
(r_trash_share, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue) lwidth(*0.75 *1.25)) mlabels(1.S#1.T = 12 "Waste treatment share") mlabcolor(midblue)) ///
(r_mun_workers_PC, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue) lwidth(*0.75 *1.25)) mlabels(1.S#1.T = 12 "N public employees (PC)") mlabcolor(midblue)) ///
, omitted keep(1.S#1.T) xline(0) graphregion(color(white)) legend(off) ///
coeflabels(1.S#1.T = `" "') ylabel(, notick labgap(0)) xlabel(-0.4(0.2)0.6)
gr export "$folder/Figures/FigureA7.png" , replace 

